package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.param.entity.GaInvestorSubjectConfig;
import com.jrx.anytxn.param.mapper.base.GaInvestorSubjectConfigMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * mapper接口扩展类
 *
 * @author 黄秋平
 * @create 2020/6/15
 */
public interface ExtGaInvestorSubjectConfigMapper extends GaInvestorSubjectConfigMapper {

    /**
     * 根据租户ID查询所有
     *
     * @param tenantId 租户ID
     * @return java.util.List<com.jrx.anytxn.param.entity.GAInvestorSubjectConfig>
     */
    List<GaInvestorSubjectConfig> selectByTenantId(@Param("tenantId")String tenantId);

    /**
     * 根据租户Id和ID更新
     *
     * @param gaInvestorSubjectConfig 科目配置表实体
     * @return int
     */
    int updateByPrimaryKeySelectiveAndNotNull(GaInvestorSubjectConfig gaInvestorSubjectConfig);

    /**
     * 根据出资方ID和租户ID删除此信息
     *
     * @param tenantId   租户ID
     * @param investorId investorId
     * @return int
     */
    int deleteByInvestorIdAndTenId(@Param("investorId") String investorId,@Param("tenantId") String tenantId,@Param("orgId") String orgId);

    /**
     * 根据租户ID和出资方ID查寻信息
     *
     * @param tenantId   租户ID
     * @param investorId 出资方id
     * @return com.jrx.anytxn.param.entity.GAInvestorSubjectConfig
     */
    List<GaInvestorSubjectConfig> selectByTenIdAndInvestorIdAndOrgId(@Param("tenantId") String tenantId, @Param("investorId") String investorId,@Param("orgId") String orgId);

    List<GaInvestorSubjectConfig> selectAllConfig(@Param("tenantId") String tenantId);

}
